home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / grafik / 3d & render tools / irit / man / man6 / cinterp.6 < prev    next >
Text File  |  1996-07-16  |  2KB  |  44 lines

  1. .TH CINTERP
  2.  6 "IRIT Version 6.0" 
  3. .SH NAME
  4. CINTERP
  5.  
  6.  
  7.  
  8.  CurveType CINTERP( ListType PtList, NumericType Order, NumericType Size,
  9.                                      ConstantType Param, NumericType Periodic)
  10.  
  11. Computes a Bspline polynomial curve that interpolates or approximates
  12. the list of points in PtList. The Bspline curve will have order
  13. Order and Size control points, and will be periodic if
  14. periodic is none zero. The knots will be spaced according to
  15. Param which can be one of PARAM_UNIFORM, PARAM_CHORD or
  16. PARAM_CENTRIP. The former prescribes a uniform knot sequence and the
  17. latters specify knot spacing according to the chord
  18. length and a square root of the chord length. A periodic curve will be
  19. coerced to have PARAM_UNIFORM knot sequence.
  20. Use of Periodic end conditions can create cases with degenerated
  21. linear systems (determinant equal zero).  Increase or decrease of the
  22. Order of the Bspline by one will resolve the problem.
  23. All points in PtList must be of type (E1-E5, P1-P5) control point,
  24. or regular PointType. If Size is equal to the number of points in
  25. PtList the resulting curve will interpolate the data set.
  26. Otherwise, if Size is less than the number of points in PtList
  27. the point data set will be least square approximated. In no time can Size
  28. be lower than Order. Size of zero forces interpolation by
  29. setting Size to the data set size.
  30. All interior knots will be distinct preserving maximal continuity.
  31. The resulting Bspline curve will have open end conditions.
  32.  
  33. Example:
  34.  
  35.     pl = nil();
  36.     for ( x = 0, 1, 100,
  37.           snoc(point(cos(x / 5), sin(x / 5), x / 50 - 1), pl)
  38.     );
  39.     c = CINTERP( pl, 3, 21, PARAM_UNIFORM );
  40.  
  41. Samples a helical curve at 100 points and least square fit a quadratic
  42. Bspline curve with 21 point to the data set. The curve will have a uniform
  43. knot spacing.
  44.